import request from '@/utils/request'

// 查询门禁钥匙维护列表
export function listKey_door(query) {
  return request({
    url: '/base/key_door/list',
    method: 'get',
    params: query
  })
}

// 查询门禁钥匙维护详细
export function getKey_door(id) {
  return request({
    url: '/base/key_door/' + id,
    method: 'get'
  })
}
//下载二维码
export function generateDoorKeyImage(doorKey,id) {
  return request({
    url: `/base/key_door/generateDoorKeyImage?doorKey=${doorKey}&id=${id}`,
    method: 'get'
  })
}
// 新增门禁钥匙维护
export function addKey_door(data) {
  return request({
    url: '/base/key_door',
    method: 'post',
    data: data
  })
}

// 修改门禁钥匙维护
export function updateKey_door(data) {
  return request({
    url: '/base/key_door',
    method: 'put',
    data: data
  })
}

// 删除门禁钥匙维护
export function delKey_door(id) {
  return request({
    url: '/base/key_door/' + id,
    method: 'delete'
  })
}
